package com.che300.test.dto;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author chenjl26787
 * @version 1.0
 * @date 2025-02-23$ 20:10
 */
@Data
@AllArgsConstructor
public class Result<T> {
    private Integer code;
    private String message;
    private T data;

    public static <T> Result<T> success(T data) {
        return new Result<>(200, "success", data);
    }

    public static <T>Result<T> error(T data ) {return new Result<>(500, "error", data);}
}
